<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p3_边框</title>
    <style>
        .d1{
            width: 100px;
            height: 100px;
            background-color: aqua;
            border: 5px solid #f00;
            border-top: 5px solid #ff0;
            /* 设置边框圆角 值越大 角越圆 值为正方形宽高的一般时可实现圆形 */
            border-radius: 100px;
        }
        .d2{
            width: 200px;
            height: 200px;
            background-color: darkkhaki;
            border: 5px solid red;
            padding-left: 50px;
            padding-top: 50px;
            margin: 50px;
            /* 将盒子模型计算方案切换成边框盒子：
            无论是加外间距还是边框，元素大小都不会改变，都在预设的宽高之内*/
            box-sizing: border-box;
        }
        .d3{
            width: 210px;
            height: 165px;
            background-color: olive;
            border: 10px solid red;
            border-bottom: 5px solid red;
            padding-top: 50px ;
            padding-left: 20px;
            padding-right: 20px;
            padding-bottom: 0;
            margin: 20px 50px ;
            margin-bottom: 0;
            box-sizing: border-box;
        }
        span{
            border : 3px solid #f00;
        }
        .s2{
            /*行内元素垂直方向的内外间距都不生效，不要用！！！ */
            padding: 50px ;
        }


    </style>
</head>
<body>
    <div class="d1"></div>
    <div class="d2">内间距测试</div>
    <div class="d3">huahuahau</div>
    <hr>

    <span>span1</span><span class="s2">span2</span><span>span3</span>
<p>我是测试文字</p>
</body>
</html>